package org.thread.test05.syn.homework.demo03;

/**
 * 取钱
 * @author CSY
 * @date 2025 - 03 - 12
 */
public class MyRunnable implements Runnable {
    /**
     * 账号
     */
    private Account account;

    /**
     * 取钱啊用户
     */
    private String user;

    /**
     * 取钱金额
     */
    private double money;

    private String lock = "";

    public MyRunnable(){}

    public MyRunnable(Account account, String user, double money) {
        this.account = account;
        this.user = user;
        this.money = money;
    }

    @Override
    public void run() {

        account.getMoney(user,money);
    }
}
